package com.xuelang.pipeline.artifact.app.harborv2.request;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author xiwen.zxg
 * @since 2024/7/11
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ListProjectQuery {
    /**
     * The name of project.
     */
    private String name;
    /**
     * The name of project owner.
     */
    private String owner;
    /**
     * The page number
     */
    private Long page;
    /**
     * The size of per page
     */
    private Long pageSize;
    /**
     * The project is public or private.
     */
    private Boolean requestPublic;
    /**
     * Query string to query resources. Supported query patterns are "exact match(k=v)", "fuzzy
     * match(k=~v)", "range(k=[min~max])", "list with union releationship(k={v1 v2 v3})" and
     * "list with intersetion relationship(k=(v1 v2 v3))". The value of range and list can be
     * string(enclosed by " or '), integer or time(in format "2020-04-09 02:36:00"). All of
     * these query patterns should be put in the query string "q=xxx" and splitted by ",". e.g.
     * q=k1=v1,k2=~v2,k3=[min~max]
     */
    private String q;
    /**
     * Sort the resource list in ascending or descending order. e.g. sort by field1 in ascending
     * order and field2 in descending order with "sort=field1,-field2"
     */
    private String sort;
    /**
     * Bool value indicating whether return detailed information of the project
     */
    private Boolean withDetail;
}
